{%extends "base.html"%}

{%block metas%}
{{super()}}
<meta name="description" content="马克笔记是一个整理知识、分享知识，帮助你搜索知识的网站">
{%endblock metas%}
{%block styles%}

<link rel="stylesheet" href="{{url_for("static", filename="dist/css/home.min.css")}}">

{{super()}}
{%endblock styles%}

{%block content%}
<div class="main-dropdown">
    {% if not current_user.is_authenticated%}
    <div class="b-sign">
        <div class="container">
            <div class="site-intro">
                <h3 class="title">
                    <span class="c">欢迎使用</span>
                    马克笔记
                </h3>
                <p class="c">记录平时的学习心得</p>
                <p class="c">与别人分享知识、经验和见解</p>
            </div>
            <div class="bn-group">
                <a href="{{url_for("home.login")}}" class="lnk-signin">登录马克笔记</a>
                <a href="{{url_for("home.register")}}" class="lnk-signup">注册账号</a>
            </div>
        </div>
    </div>
    {%endif%}
 
    <div class="b-section search-section">
        <div class="container">
            <div class="search-inner">
                <h2 class="title">搜索知识库</h2>
                <form action="{{url_for("home.search")}}">
                    <input type="text" name="keyword" class="search-input form-control"/>
                    <input type="submit" class="search-submit btn btn-default" value="搜索"/>
                </form>
            </div>
        </div>
    </div>

    <div class="b-section navbar-section">
        <div class="container">
            <div class="navbar-inner">
                <h3 class="title">导航</h3>
                <ul class="content-group clearfix">
                    <li class="content-group-item col-sm-6">
                    <a href="{{url_for("article.index")}}" class="content-link">
                        <span class="fa fa-file-text-o"></span>
                        <span class="c">文章</span>
                    </a>
                    </li>
                    <li class="content-group-item col-sm-6">
                    <a href="{{url_for("home.topic")}}" class="content-link">
                        <span class="fa fa-hashtag"></span>
                        <span class="c">专题</span>
                    </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>


    <div class="b-section newest-section">
        <div class="container">
            <div class="newest-inner">
                <h3 class="title">最近更新</h3>
                <ul class="newest-group">
                    {%for article in newests%}
                    <li class="newest-group-item clearfix">
                    <span class="newest-type">【文章】</span>
                    <a href="{{url_for("article.reader", pathname=article.pathname)}}" class="name">
                        {{article.title}}
                    </a>
                    <span class="time">{{article.timestamp|friendly_time}}</span>
                    <a href="{{url_for("article.reader", pathname=article.pathname)}}" class="btn-newest btn btn-default">开始阅读</a>
                    </li>
 
                    {%endfor%}
 
                </ul>
            </div>
        </div>
    </div>

    {%include "_footer.html"%}
</div>


{%endblock content%}

{%block scripts%}

<script src="{{url_for("static", filename="dist/js/common.min.js")}}"></script>

{{super()}}
{%endblock scripts%}


